package yongjian.drp.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import yongjian.drp.dao.ClientDao;
import yongjian.drp.model.Client;
import yongjian.drp.vo.ClientVO;

@Component
public class ClientService {

	private ClientDao clientDao;

	public ClientDao getClientDao() {
		return clientDao;
	}
	@Resource
	public void setClientDao(ClientDao clientDao) {
		this.clientDao = clientDao;
	}

	public List<ClientVO> getClientByPid(String id) {
		return clientDao.getClientByPid(id);
	}
	
	public void add(Client client) {
		clientDao.add(client);
	}

	public void modify(Client client) {
		clientDao.modify(client);
	}

	public void delete(int id) {
		clientDao.delete(id);
	}

	public List<Client> queryByPage(int page, int rows, String key) {
		return clientDao.queryByPage(page, rows, key);
	}
	
	public List<ClientVO> queryByFlag(String flag) {
		return clientDao.queryByFlag(flag);
	}

	public int getAllRecord(String key) {
		return clientDao.getAllRecord(key);
	}	
}
